package Model;

public class ModelClass extends java.util.Observable {

	private int counter;	

	public ModelClass(){

//		System.out.println("Model()");

	} //Model()

	public void setValue(int value) {

		this.counter = value;
//		System.out.println("Model init: counter = " + counter);
		setChanged();
		//model Push - send counter as part of the message
		notifyObservers(counter);
		//if using Model Pull, then can use notifyObservers()
		//notifyObservers()

	} //setValue()
	
	public void incrementValue() {

//		++counter;
//		System.out.println("Model     : counter = " + counter);
		
		
		setChanged();
		//model Push - send counter as part of the message
		notifyObservers(counter);
		//if using Model Pull, then can use notifyObservers()
		//notifyObservers()

	} //incrementValue()
	
	

}
